﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Runtime.InteropServices;
namespace Public
{
    public partial class FrmProgressBar : Form
    {
        public FrmProgressBar()
        {
            InitializeComponent();

            IntPtr close = GetSystemMenu(this.Handle, 0);
            RemoveMenu(close, 6, MF_BYPOSITION);
        }

        public void runBar(string _标题,int _位置,string _进度显示) {

            this.Text = _标题+" 【当前进度："+_进度显示+"】";
            this.progressBar1.Value = _位置;
            this._进度条.Text = _进度显示;
            Application.DoEvents();
        


        }

        [DllImport("user32")]
        public static extern IntPtr GetSystemMenu(IntPtr hwnd, int bRevert);

        [DllImport("user32")]
        public static extern int RemoveMenu(IntPtr hMenu, int nPosition, int wFlags);

        public const int MF_BYPOSITION = 0x400;



    }
}